package mapred;

import java.io.IOException;

import mapred.config.JobConfig;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;

public abstract class AdvancedMapReduceBase extends MapReduceBase {

    private JobConfig config;

    public void configure(JobConf conf) {
        super.configure(conf);

        this.config = new JobConfig(conf);
        this.setUp();
    }

    protected abstract void setUp();

    protected FileSystem getFileSystem() throws IOException {
        return this.config.getFileSystem();
    }

    public String getConfig(String key) {
        return this.config.get(key);
    }

}
